To recognize a target object by using images or to detect a target object represented on an image in character recognition, detection of a particular object, biometric authentication, or the like, a process for comparing target objects represented on two respective images may be carried out. For such comparison, it is preferable that the positions of the target objects in the respective images match. However, the positional relationship between each target object and an image capturing device that captures the target object and generates the image of the target object is not necessarily the same. This sometimes causes the positions of the target objects in respective images to be different. To address this issue, an alignment process is carried out for aligning the target objects in the respective images.
When relative positional relationship between the target objects in respective images is uncertain, an alignment apparatus that carries out an alignment process computes, for example, while changing the position of a comparison image with respect to a reference image little by little by using affine transformation, cross-correlation values between the two images to thereby obtain the largest cross-correlation value. By moving the comparison image to have the positional relationship corresponding to the largest cross-correlation value, the alignment apparatus aligns the target object in the comparison image with the target object in the reference image.
However, in the alignment process as described above, the alignment apparatus carries out a process for computing a cross-correlation value a great number of times, which causes a large amount of computation and consequently takes long time for alignment. To address this problem, a technique has been proposed for reducing the amount of computation for an alignment process (for example, refer to Japanese Laid-open Patent Publication No. 2009-245347).
In the pattern alignment method disclosed in Japanese Laid-open Patent Publication No. 2009-245347, each of a comparison reference pattern and comparison target pattern is converted to an angle, a scale, a middle-point X coordinate, and a middle-point Y coordinate, and the difference in angle is calculated on the basis of the angles and scales while the scale ratio is calculated on the basis of the middle-point X coordinates and the middle-point Y coordinates. Then, in this alignment method, after one of the comparison reference pattern and the comparison target pattern is transformed in terms of angle and scale, template matching is repeatedly carried out along a set search path to determine a translation amount (i.e., parallel shift amount).